import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '@/views/home/home.vue'
import indexView from '@/views/home/index.vue'
import calView from '@/views/home/cal.vue'
import cartView from '@/views/home/cart.vue'
import myView from '@/views/home/my.vue'
import ssView from '@/views/home/ss.vue'
import dlView from '@/views/home/dl.vue'
import zcView from '@/views/home/zc.vue'
import splbView from '@/views/home/splb.vue'
import xqView from '@/views/home/xq.vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {    
       path:'/',redirect:'home/index'
    },
    {path: '/home',component: HomeView,children:[
      {path: 'index',component: indexView},
      {path: 'cal',component: calView},
      {path: 'cart',component: cartView},
      {path: 'my',component: myView},
    ]},
    {
      path: '/ss',component: ssView
    },
    {
      path: '/dl',component: dlView
    },
    {
      path: '/zc',component: zcView
    },
    {
      path: '/xq/:goods_id	',component: xqView
    },
    {
      path: '/splb/:cat_name',component: splbView
    },
  ],
})

export default router
